package com.itstherules.jmsunit.mock.store;

import org.junit.Assert;
import org.junit.Test;

import com.itstherules.jmsunit.expectation.AlwaysGoodExpectation;
import com.itstherules.jmsunit.expectation.TextEqualsExpectation;
import com.itstherules.jmsunit.mock.store.CompositeExpectation;

public class ExpectationStoreTest {

	@Test
	public void canPrintDefaultExpectations(){
		CompositeExpectation unit = new CompositeExpectation();
		unit.add(new AlwaysGoodExpectation());
		unit.add(new TextEqualsExpectation("imExpectedForDinner"));
		Assert.assertEquals("The Expectations are: [Expected to be always good][Text is equals (expected is imExpectedForDinner)]", unit.toString());
	}

	@Test
	public void canAddExpectations(){
		CompositeExpectation unit = new CompositeExpectation();
		Assert.assertEquals("The Expectations are: empty", unit.toString());
		unit.add(new AlwaysGoodExpectation());
		Assert.assertEquals("The Expectations are: [Expected to be always good]", unit.toString());
	}
		
}
